package com.xja.boke.service.impl;

import com.xja.boke.entity.User;
import com.xja.boke.mapper.UserMapper;
import com.xja.boke.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserImpl implements UserService {
    @Autowired
    private UserMapper userMapper;
    public User selectByName(String username){
        /**
         * 登录 根据名字查询
         * @return
         */
        return userMapper.selectByName(username);
    }

    /**
     * 注册
     * @param user
     * @return
     */
    @Override
    public int insertSelective(User user) {
        return userMapper.insertSelective(user);
    }


}
